<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>社交平台 - 幸运抽奖中心</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #FF5252;
            --primary-light: #FFEBEE;
            --primary-dark: #D32F2F;
            --secondary: #FFB74D;
            --secondary-light: #FFF8E1;
            --success: #4CAF50;
            --dark: #333333;
            --gray: #757575;
            --light: #F5F5F5;
            --border: #E0E0E0;
            --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
        }
        
        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            background-color: #FFF5F5;
            color: var(--dark);
            line-height: 1.6;
        }
        
        /* 导航栏样式 */
        .navbar {
            background-color: white;
            box-shadow: var(--shadow);
            padding: 0.75rem 1rem;
            position: sticky;
            top: 0;
            z-index: 1000;
        }
        
        .navbar-brand {
            font-weight: 700;
            color: var(--primary);
            font-size: 1.5rem;
        }
        
        .nav-link {
            color: var(--dark);
            margin-left: 0.5rem;
            margin-right: 0.5rem;
            font-weight: 500;
            transition: color 0.2s;
            padding: 0.5rem 0.75rem !important;
        }
        
        .nav-link:hover, .nav-link.active {
            color: var(--primary);
        }
        
        /* 主内容区 */
        .main-content {
            padding: 2rem 0;
        }
        
        /* 页面标题 */
        .page-title {
            text-align: center;
            margin-bottom: 2.5rem;
        }
        
        .page-title h1 {
            font-size: 2.25rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 0.5rem;
        }
        
        .page-title p {
            color: var(--gray);
            max-width: 600px;
            margin: 0 auto;
        }
        
        /* 抽奖类型标签 */
        .draw-tabs {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-bottom: 2rem;
        }
        
        .draw-tab {
            padding: 0.5rem 1.5rem;
            border-radius: 20px;
            background-color: white;
            border: 1px solid var(--border);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .draw-tab.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .draw-tab:hover:not(.active) {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        /* 抽奖卡片样式 */
        .draw-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2.5rem;
        }
        
        .draw-card {
            background-color: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: transform 0.3s, box-shadow 0.3s;
            position: relative;
        }
        
        .draw-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
        }
        
        .draw-badge {
            position: absolute;
            top: 1rem;
            left: 1rem;
            background-color: var(--primary);
            color: white;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            z-index: 10;
        }
        
        .draw-image {
            width: 100%;
            height: 180px;
            object-fit: cover;
        }
        
        .draw-content {
            padding: 1.5rem;
        }
        
        .draw-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--dark);
        }
        
        .draw-description {
            color: var(--gray);
            font-size: 0.9rem;
            margin-bottom: 1rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .draw-meta {
            display: flex;
            justify-content: space-between;
            font-size: 0.85rem;
            color: var(--gray);
            margin-bottom: 1.25rem;
        }
        
        .draw-meta-item {
            display: flex;
            align-items: center;
        }
        
        .draw-meta-item i {
            margin-right: 0.35rem;
            font-size: 1rem;
        }
        
        .draw-actions {
            display: flex;
            gap: 0.75rem;
        }
        
        .btn {
            padding: 0.6rem 1.25rem;
            border-radius: 6px;
            font-weight: 500;
            transition: all 0.2s;
            flex: 1;
            text-align: center;
        }
        
        .btn-primary {
            background-color: var(--primary);
            border-color: var(--primary);
            color: white;
        }
        
        .btn-primary:hover {
            background-color: var(--primary-dark);
            border-color: var(--primary-dark);
        }
        
        .btn-outline {
            background-color: transparent;
            border: 1px solid var(--border);
            color: var(--dark);
        }
        
        .btn-outline:hover {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        /* 大转盘抽奖样式 */
        .wheel-container {
            max-width: 500px;
            margin: 0 auto 3rem;
            padding: 2rem;
            background-color: white;
            border-radius: 16px;
            box-shadow: var(--shadow);
            text-align: center;
        }
        
        .wheel-title {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            color: var(--primary);
        }
        
        .wheel-wrapper {
            position: relative;
            width: 100%;
            max-width: 320px;
            margin: 0 auto 1.5rem;
        }
        
        .prize-wheel {
            width: 100%;
            height: auto;
            border-radius: 50%;
            overflow: hidden;
            transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
        }
        
        .wheel-arrow {
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 40px;
            height: 40px;
            z-index: 10;
        }
        
        .wheel-info {
            display: flex;
            justify-content: center;
            gap: 2rem;
            margin-bottom: 1.5rem;
        }
        
        .wheel-info-item {
            text-align: center;
        }
        
        .wheel-info-value {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--primary);
        }
        
        .wheel-info-label {
            font-size: 0.85rem;
            color: var(--gray);
        }
        
        /* 奖品展示区 */
        .prizes-section {
            margin-bottom: 3rem;
        }
        
        .section-title {
            font-size: 1.75rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            padding-bottom: 0.75rem;
            border-bottom: 2px solid var(--primary-light);
            color: var(--dark);
        }
        
        .prizes-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 1.5rem;
        }
        
        .prize-item {
            background-color: white;
            border-radius: 8px;
            padding: 1rem;
            text-align: center;
            box-shadow: var(--shadow);
            transition: transform 0.2s;
        }
        
        .prize-item:hover {
            transform: translateY(-3px);
        }
        
        .prize-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 0.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: var(--primary-light);
            border-radius: 50%;
            font-size: 2rem;
            color: var(--primary);
        }
        
        .prize-name {
            font-weight: 600;
            margin-bottom: 0.25rem;
        }
        
        .prize-count {
            font-size: 0.85rem;
            color: var(--gray);
        }
        
        /* 中奖记录 */
        .winners-section {
            margin-bottom: 3rem;
        }
        
        .winners-list {
            background-color: white;
            border-radius: 12px;
            box-shadow: var(--shadow);
            overflow: hidden;
        }
        
        .winner-item {
            display: flex;
            align-items: center;
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border);
        }
        
        .winner-item:last-child {
            border-bottom: none;
        }
        
        .winner-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 1rem;
        }
        
        .winner-info {
            flex: 1;
        }
        
        .winner-name {
            font-weight: 500;
            margin-bottom: 0.15rem;
        }
        
        .winner-time {
            font-size: 0.8rem;
            color: var(--gray);
        }
        
        .winner-prize {
            background-color: var(--secondary-light);
            color: var(--secondary);
            padding: 0.25rem 0.75rem;
            border-radius: 4px;
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        /* 抽奖模态框 */
        .modal-content {
            border-radius: 12px;
            border: none;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        }
        
        .modal-header {
            border-bottom: none;
            padding: 1.5rem 1.5rem 0.5rem;
        }
        
        .modal-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--dark);
        }
        
        .modal-body {
            padding: 1.5rem;
        }
        
        .modal-footer {
            border-top: none;
            padding: 0.5rem 1.5rem 1.5rem;
            justify-content: center;
            gap: 1rem;
        }
        
        /* 中奖结果模态框 */
        .result-modal-body {
            text-align: center;
            padding: 2rem 1.5rem;
        }
        
        .result-icon {
            width: 100px;
            height: 100px;
            margin: 0 auto 1.5rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
        }
        
        .result-icon.success {
            background-color: rgba(76, 175, 80, 0.1);
            color: var(--success);
        }
        
        .result-icon.fail {
            background-color: rgba(158, 158, 158, 0.1);
            color: var(--gray);
        }
        
        .result-title {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }
        
        .result-message {
            color: var(--gray);
            margin-bottom: 1.5rem;
        }
        
        .result-prize {
            background-color: var(--secondary-light);
            color: var(--secondary);
            padding: 0.5rem 1rem;
            border-radius: 8px;
            display: inline-block;
            margin-bottom: 1.5rem;
            font-weight: 500;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .page-title h1 {
                font-size: 1.75rem;
            }
            
            .section-title {
                font-size: 1.5rem;
            }
            
            .wheel-container {
                padding: 1.5rem 1rem;
            }
            
            .draw-actions {
                flex-direction: column;
            }
        }
        
        @media (max-width: 576px) {
            .main-content {
                padding: 1.5rem 0;
            }
            
            .draw-tabs {
                gap: 0.5rem;
            }
            
            .draw-tab {
                padding: 0.5rem 1rem;
                font-size: 0.9rem;
            }
            
            .wheel-info {
                gap: 1rem;
            }
            
            .winner-item {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .winner-prize {
                margin-top: 0.5rem;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg">
        <div class="container">
            <a class="navbar-brand" href="#">社交平台</a>
            
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <i class="fas fa-bars"></i>
            </button>
            
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#"><i class="fas fa-home me-1"></i> 首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#"><i class="fas fa-compass me-1"></i> 发现</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#"><i class="fas fa-users me-1"></i> 社区</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" aria-current="page" href="#"><i class="fas fa-gift me-1"></i> 幸运抽奖</a>
                    </li>
                </ul>
                
                <ul class="navbar-nav ms-3">
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
                            <img src="https://picsum.photos/100/100?random=1" alt="用户头像" class="rounded-circle" style="width: 36px; height: 36px; object-fit: cover;">
                        </a>
                        <ul class="dropdown-menu dropdown-menu-end">
                            <li><a class="dropdown-item" href="#"><i class="fas fa-user me-2"></i> 个人中心</a></li>
                            <li><a class="dropdown-item" href="#"><i class="fas fa-trophy me-2"></i> 我的奖品</a></li>
                            <li><a class="dropdown-item" href="#"><i class="fas fa-cog me-2"></i> 设置</a></li>
                            <li><hr class="dropdown-divider"></li>
                            <li><a class="dropdown-item" href="#"><i class="fas fa-sign-out-alt me-2"></i> 退出登录</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    
    <div class="container main-content">
        <!-- 页面标题 -->
        <div class="page-title">
            <h1>幸运抽奖中心</h1>
            <p>参与抽奖活动，赢取丰厚奖品！每日签到和互动可获得更多抽奖机会</p>
        </div>
        
        <!-- 抽奖类型标签 -->
        <div class="draw-tabs">
            <div class="draw-tab active">全部活动</div>
            <div class="draw-tab">大转盘</div>
            <div class="draw-tab">砸金蛋</div>
            <div class="draw-tab">刮刮乐</div>
            <div class="draw-tab">积分兑换</div>
            <div class="draw-tab">限时活动</div>
        </div>
        
        <!-- 大转盘抽奖 -->
        <div class="wheel-container">
            <h3 class="wheel-title">每日幸运大转盘</h3>
            
            <div class="wheel-wrapper">
                <img src="https://picsum.photos/600/600?random=20" alt="幸运大转盘" class="prize-wheel" id="prizeWheel">
                <img src="https://picsum.photos/100/100?random=21" alt="转盘指针" class="wheel-arrow">
            </div>
            
            <div class="wheel-info">
                <div class="wheel-info-item">
                    <div class="wheel-info-value" id="remainingDraws">3</div>
                    <div class="wheel-info-label">今日剩余次数</div>
                </div>
                <div class="wheel-info-item">
                    <div class="wheel-info-value" id="totalPoints">158</div>
                    <div class="wheel-info-label">我的积分</div>
                </div>
            </div>
            
            <button class="btn btn-primary" id="spinWheelBtn" data-bs-toggle="modal" data-bs-target="#drawConfirmModal">
                <i class="fas fa-play-circle me-1"></i> 开始抽奖
            </button>
        </div>
        
        <!-- 其他抽奖活动 -->
        <h2 class="section-title"><i class="fas fa-gift me-2"></i> 更多抽奖活动</h2>
        
        <div class="draw-cards">
            <div class="draw-card">
                <div class="draw-badge">热门</div>
                <img src="https://picsum.photos/600/400?random=30" alt="砸金蛋活动" class="draw-image">
                <div class="draw-content">
                    <h3 class="draw-title">幸运金蛋，好礼不停</h3>
                    <p class="draw-description">砸开金蛋赢取惊喜大奖，100%中奖率，最高可获得最新款手机！</p>
                    <div class="draw-meta">
                        <div class="draw-meta-item"><i class="fas fa-ticket-alt"></i> 消耗: 20积分/次</div>
                        <div class="draw-meta-item"><i class="fas fa-calendar-alt"></i> 剩余3天</div>
                    </div>
                    <div class="draw-actions">
                        <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#drawConfirmModal">立即参与</button>
                        <button class="btn btn-outline">查看详情</button>
                    </div>
                </div>
            </div>
            
            <div class="draw-card">
                <div class="draw-badge">新活动</div>
                <img src="https://picsum.photos/600/400?random=31" alt="刮刮乐活动" class="draw-image">
                <div class="draw-content">
                    <h3 class="draw-title">好运刮刮乐</h3>
                    <p class="draw-description">经典刮刮乐玩法，即开即中，惊喜不断，快来试试手气吧！</p>
                    <div class="draw-meta">
                        <div class="draw-meta-item"><i class="fas fa-ticket-alt"></i> 消耗: 10积分/次</div>
                        <div class="draw-meta-item"><i class="fas fa-calendar-alt"></i> 剩余7天</div>
                    </div>
                    <div class="draw-actions">
                        <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#drawConfirmModal">立即参与</button>
                        <button class="btn btn-outline">查看详情</button>
                    </div>
                </div>
            </div>
            
            <div class="draw-card">
                <img src="https://picsum.photos/600/400?random=32" alt="积分兑换活动" class="draw-image">
                <div class="draw-content">
                    <h3 class="draw-title">积分兑换好礼</h3>
                    <p class="draw-description">使用积分直接兑换心仪奖品，无需抽奖，兑换成功后立即发放。</p>
                    <div class="draw-meta">
                        <div class="draw-meta-item"><i class="fas fa-ticket-alt"></i> 消耗: 50-500积分</div>
                        <div class="draw-meta-item"><i class="fas fa-calendar-alt"></i> 长期有效</div>
                    </div>
                    <div class="draw-actions">
                        <button class="btn btn-primary">立即兑换</button>
                        <button class="btn btn-outline">查看详情</button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 奖品展示 -->
        <div class="prizes-section">
            <h2 class="section-title"><i class="fas fa-award me-2"></i> 热门奖品</h2>
            
            <div class="prizes-grid">
                <div class="prize-item">
                    <div class="prize-icon">
                        <i class="fas fa-mobile-alt"></i>
                    </div>
                    <div class="prize-name">智能手机</div>
                    <div class="prize-count">剩余 3 份</div>
                </div>
                
                <div class="prize-item">
                    <div class="prize-icon">
                        <i class="fas fa-laptop"></i>
                    </div>
                    <div class="prize-name">笔记本电脑</div>
                    <div class="prize-count">剩余 2 份</div>
                </div>
                
                <div class="prize-item">
                    <div class="prize-icon">
                        <i class="fas fa-headphones"></i>
                    </div>
                    <div class="prize-name">无线耳机</div>
                    <div class="prize-count">剩余 15 份</div>
                </div>
                
                <div class="prize-item">
                    <div class="prize-icon">
                        <i class="fas fa-gift"></i>
                    </div>
                    <div class="prize-name">100元代金券</div>
                    <div class="prize-count">剩余 50 份</div>
                </div>
                
                <div class="prize-item">
                    <div class="prize-icon">
                        <i class="fas fa-coins"></i>
                    </div>
                    <div class="prize-name">50积分</div>
                    <div class="prize-count">剩余 200 份</div>
                </div>
                
                <div class="prize-item">
                    <div class="prize-icon">
                        <i class="fas fa-tshirt"></i>
                    </div>
                    <div class="prize-name">定制T恤</div>
                    <div class="prize-count">剩余 30 份</div>
                </div>
            </div>
        </div>
        
        <!-- 中奖记录 -->
        <div class="winners-section">
            <h2 class="section-title"><i class="fas fa-trophy me-2"></i> 最近中奖记录</h2>
            
            <div class="winners-list">
                <div class="winner-item">
                    <img src="https://picsum.photos/100/100?random=40" alt="用户头像" class="winner-avatar">
                    <div class="winner-info">
                        <div class="winner-name">张先生</div>
                        <div class="winner-time">今天 14:35</div>
                    </div>
                    <div class="winner-prize">无线耳机</div>
                </div>
                
                <div class="winner-item">
                    <img src="https://picsum.photos/100/100?random=41" alt="用户头像" class="winner-avatar">
                    <div class="winner-info">
                        <div class="winner-name">李女士</div>
                        <div class="winner-time">今天 13:20</div>
                    </div>
                    <div class="winner-prize">100元代金券</div>
                </div>
                
                <div class="winner-item">
                    <img src="https://picsum.photos/100/100?random=42" alt="用户头像" class="winner-avatar">
                    <div class="winner-info">
                        <div class="winner-name">王先生</div>
                        <div class="winner-time">今天 11:05</div>
                    </div>
                    <div class="winner-prize">50积分</div>
                </div>
                
                <div class="winner-item">
                    <img src="https://picsum.photos/100/100?random=43" alt="用户头像" class="winner-avatar">
                    <div class="winner-info">
                        <div class="winner-name">赵女士</div>
                        <div class="winner-time">昨天 20:40</div>
                    </div>
                    <div class="winner-prize">定制T恤</div>
                </div>
                
                <div class="winner-item">
                    <img src="https://picsum.photos/100/100?random=44" alt="用户头像" class="winner-avatar">
                    <div class="winner-info">
                        <div class="winner-name">陈先生</div>
                        <div class="winner-time">昨天 18:15</div>
                    </div>
                    <div class="winner-prize">智能手机</div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 抽奖确认模态框 -->
    <div class="modal fade" id="drawConfirmModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title"><i class="fas fa-gift me-2"></i> 确认抽奖</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <p>您确定要消耗1次抽奖机会进行抽奖吗？</p>
                    <p class="text-muted">本次抽奖后，今日剩余抽奖次数将变为 <span class="text-primary fw-bold">2</span> 次</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-outline" data-bs-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" id="confirmDrawBtn" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#resultModal">确认抽奖</button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 中奖结果模态框 -->
    <div class="modal fade" id="resultModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">抽奖结果</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body result-modal-body">
                    <div class="result-icon success">
                        <i class="fas fa-trophy"></i>
                    </div>
                    <h3 class="result-title">恭喜您中奖了！</h3>
                    <p class="result-message">太棒了！您在本次抽奖中获得了以下奖品：</p>
                    <div class="result-prize">100元代金券</div>
                    <p class="text-muted">奖品将在24小时内发放至您的账户，请留意通知</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-outline" data-bs-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" data-bs-dismiss="modal">查看我的奖品</button>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 抽奖类型标签切换
            const drawTabs = document.querySelectorAll('.draw-tab');
            drawTabs.forEach(tab => {
                tab.addEventListener('click', function() {
                    drawTabs.forEach(t => t.classList.remove('active'));
                    this.classList.add('active');
                });
            });
            
            // 大转盘抽奖功能
            const spinWheelBtn = document.getElementById('spinWheelBtn');
            const prizeWheel = document.getElementById('prizeWheel');
            const remainingDrawsEl = document.getElementById('remainingDraws');
            let remainingDraws = 3;
            let isSpinning = false;
            
            // 确认抽奖按钮点击事件
            document.getElementById('confirmDrawBtn').addEventListener('click', function() {
                if (remainingDraws > 0 && !isSpinning) {
                    spinWheel();
                }
            });
            
            // 转盘旋转函数
            function spinWheel() {
                isSpinning = true;
                spinWheelBtn.disabled = true;
                
                // 减少剩余抽奖次数
                remainingDraws--;
                remainingDrawsEl.textContent = remainingDraws;
                
                // 随机旋转角度 (3-5圈 + 随机角度)
                const spinAngle = 1080 + Math.floor(Math.random() * 720) + Math.floor(Math.random() * 360);
                
                // 应用旋转
                prizeWheel.style.transform = `rotate(${spinAngle}deg)`;
                
                // 旋转结束后重新启用按钮
                setTimeout(() => {
                    isSpinning = false;
                    spinWheelBtn.disabled = remainingDraws <= 0;
                }, 5000);
            }
            
            // 初始化转盘状态
            if (remainingDraws <= 0) {
                spinWheelBtn.disabled = true;
            }
        });
    </script>
</body>
</html>
    
